#include <iostream>
#include <string>
using namespace std;




int main()
{
	int month ,day ,year =0;
	char c = '`';
	cin>>month>>c>>day>>c>>year;
	printf("%04d%c%02d%c%02d",year,c,month,c,day);
	return 0;
}
